package com.example.tse.rbhttpservice.service.shopping.model;

import java.util.List;
import java.util.ArrayList;
import com.example.tse.rbhttpservice.service.RudderResponse;


//import com.rbyair.services.shopping.model.ShoppingGet;
/**
* 获取当前用户的购物车中商品，按仓库组合商品，商品的关税为商品对应的分类的关税，团购的商品限购数量为0时，不能选择该商品，点击选择按钮提示已售罄，商品数量不能更改
* @author wliu
* edit tse
*/
public class ShoppingGetResponse extends RudderResponse{

private List<ShoppingGet> get = new ArrayList<ShoppingGet>();


/**
* @return get
*/
public List<ShoppingGet> getGet() {
return this.get;
}

/**
* @return get
*/
public void setGet(List<ShoppingGet> get) {
this.get = get;
}
/**
methodName    Get
type          List<ShoppingGet>
name          get
defaultType   new ArrayList<ShoppingGet>()
*/

/**


    private static void filterFor(ShoppingGetGoods shopping) {
        if (shopping.getObjIdent() == null) {
            shopping.setObjIdent("");
        }
        if (shopping.getName() == null) {
            shopping.setName("");
        }
        if (shopping.getPrice() == null) {
            shopping.setPrice("");
        }
        if (shopping.getQuantity() == null) {
            shopping.setQuantity("");
        }
        if (shopping.getThumbnailPic() == null) {
            shopping.setThumbnailPic("");
        }
        if (shopping.getSpec() == null) {
            shopping.setSpec("");
        }
        if (shopping.getChecked() == null) {
            shopping.setChecked("");
        }
        if (shopping.getLimitNum() == null) {
            shopping.setLimitNum("");
        }
        if (shopping.getStoreNum() == null) {
            shopping.setStoreNum("");
        }
    }

    private static void filterFor(ShoppingGet shopping) {
        if (shopping.getWareName() == null) {
            shopping.setWareName("");
        }
        if (shopping.getGoods() == null) {
            shopping.setGoods(new ArrayList<ShoppingGetGoods>());
        } else {
            for (ShoppingGetGoods item : shopping.getGoods()) {
                filterFor(item);
            }
        }
        if (shopping.getSubTax() == null) {
            shopping.setSubTax("");
        }
        if (shopping.getTotal() == null) {
            shopping.setTotal("");
        }
        if (shopping.getAreaId() == null) {
            shopping.setAreaId("");
        }
        if (shopping.getChecked() == null) {
            shopping.setChecked("");
        }
    }

    public static void filter(ShoppingGetResponse shopping) {
        if (shopping.getGet() == null) {
            shopping.setGet(new ArrayList<ShoppingGet>());
        } else {
            for (ShoppingGet item : shopping.getGet()) {
                filterFor(item);
            }
        }
    }

*/

}
